<!-- 参与人员 -->
<template>
  <dt-modal-info ref="info" :title="title" :width="800">
    <Tag size="large" v-for="(item, index) in joinUserList" :key="index">
      {{ `${item.userName}${item.workNo ? '(' + item.workNo + ')' : ''}` }}
    </Tag>
    <dt-loading :loading="loading"></dt-loading>
  </dt-modal-info>
</template>

<script>
  import activityMgr from '@/biz/customerForCode/activity'
  export default {
    data() {
      return {
        title: '参与人员',
        info: {},
        joinUserList: [],
        loading: false
      }
    },
    methods: {
      show(data) {
        this.info = data
        this.$refs.info.show()
        this.init()
      },
      init() {
        this.loading = true
        let params = {
          id: this.$route.query.activityId,
          buildingId: this.$dt.buildInfo().housesId,
          pointPositionId: this.info.id,
          activityType: 2
        }
        activityMgr
          .detail(params)
          .then((res) => {
            this.loading = false
            this.joinUserList = res
          })
          .catch((err) => {
            this.loading = false
          })
      }
    }
  }
</script>

<style lang="scss" scoped></style>
